1. Field of the Invention
Methods and apparatuses consistent with the present invention relate to a new prediction mode of a macroblock, and more particularly, to encoding a skip macroblock capable of dividing a skip macroblock in a P (Predictive-coded)-frame into smaller skip sub-blocks and using predictive motion vectors predicted from motion vectors of blocks adjacent to the skip sub-blocks, and a video decoding method and apparatus for decoding the skip macroblock.
2. Description of the Related Art
Inter-frame and intra-frame predictions are two main video encoding techniques. Intra-frame prediction is a video encoding technique based on correlations of adjacent pixels in a single frame. Inter-frame prediction is a video encoding technique based on similarities between continuous frames in a video sequence.
In general, a motion vector of a block has a correlation with a motion vector of an adjacent block. Therefore, a motion vector of a current block can be predicted from an adjacent block, and only a differential motion vector between the motion vector of the current block and a predictive motion vector is encoded, so that bit-rates generated in decoding can be reduced.
FIG. 1 is a view for explaining a related art method of generating predictive motion vectors of a current macroblock.
Referring to FIG. 1, motion vector information on a current macroblock E is encoded as a differential motion vector which is a difference value between a predictive motion vector having a median value of motion vectors MVA, MVB, and MVC of left, upper, and upper right blocks A, B, and C with respect to the current macroblock E and a motion vector of the current macroblock E and is transmitted.
FIG. 2 is a view for explaining a prediction mode of a macroblock in a P-frame in H.264/Advanced Video Coding (AVC)
In encoding according to H.264, a macroblock in an I (Intra-coded)-frame is predictive-encoded according to a prediction mode selected according to a rate-distortion optimization from among intra 16×16 or intra 4×4 modes. The macroblock in the P-frame is encoded according to a prediction mode selected from among 16×16, 16×8, 8×16, 8×8, 8×4, 4×8, and 4×4 as illustrated in FIG. 2 according to the rate-distortion optimization or is encoded as a skip mode.
The skip mode is selected when a motion vector of a macroblock is the same as a predictive motion vector predicted using motion vectors of adjacent blocks or when a prediction error of a pixel is small enough. When the skip mode is selected as the prediction mode of the macroblock, an encoder transmits only skip mode information on the macroblock and does not transmit residual data. A decoder can restore the macroblock decoded as the skip mode by performing motion compensation by using the predictive motion vectors predicted from adjacent blocks.
However, according to the related art, the skip mode can be applied only to a macroblock having a size of 16×16. Therefore, all pixel values in the macroblock have to be motion-compensated by using only a single predictive motion vector, so that prediction efficiency may decrease.